import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from "../views/Home.vue";
import User from "../components/User.vue";
import Role from "../components/Role.vue";
import Permission from "../components/Permission.vue";
import UserRoles from "@/components/UserRoles";
import RolePermission from "@/components/RolePermission";


Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/Home",
  },
  {
    path: "/Home",
    component:Home,
    children:[{
      path:"User",
      component:User
    },{
      path: "Role",
      component: Role
    },{
      path: "UserRoles",
      component: UserRoles
    },{
      path: "RolePermission",
      component: RolePermission
    },{
      path: "Permission",
      component: Permission
    }]

  },

]

const router = new VueRouter({
  routes
})

export default router
